package sibu.cn.mydemo.annotation;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import sibu.cn.mydemo.R;

public class AnnotateActivity extends AppCompatActivity implements View.OnClickListener {
    @BindView(id = R.id.bind_view,click = true)
    Button bindView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_annotate);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        AnnotateUtil.initBindView(this);
        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                        .setAction("Action", null).show();
            }
        });
    }
    @Override
    public void onClick(View v) {
        Toast.makeText(this,"bindview",Toast.LENGTH_LONG).show();
    }

    public static void  jumpAnnotateActivity(Context context){

        Intent intent = new Intent(context,AnnotateActivity.class);
        context.startActivity(intent);
    }
}
